package week8;

public class Transport {
    private String name;
    private int speed;

    public Transport(String name, int speed) {
        this.name = name;
        this.speed = speed;
    }

    public Transport() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public void showInfo(){
        System.out.println("交通工具是：" + name);
        System.out.println(name+"的速度为" + speed);
    }
}
